package com.lsq.tucao.express.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lsq.tucao.express.bean.po.HeartDetail;
import org.apache.ibatis.annotations.Update;

public interface HeartDetailMapper extends BaseMapper<HeartDetail> {

    @Update("update heart_detail set like_num=like_num+1 where id=#{heartId}")
    Integer likeHeart(Long heartId);

    @Update("update heart_detail set like_num=like_num-1 where id=#{heartId}")
    Integer cancelLikeHeart(Long heartId);

    @Update("update heart_detail set discuss_num=discuss_num+1 where id=#{heartId}")
    Integer discussHeart(Long heartId);
}
